package com.library.service;


import com.library.bean.Admin;
import com.library.bean.Book;
import com.library.dao.AdminDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RegisterService {
@Autowired
    private AdminDao adminDao;//admin的dao接口
//    public boolean register(Admin admin){
//        if(checkAdminnameExists(admin.getUsername())){
//            return false;
//        }
//        return register;
//    }

//    private boolean checkAdminnameExists(String username) {
//    }
public boolean addAdmin(Admin admin) {
    return adminDao.addAdmin(admin) > 0;
}
}
